package com.raven.craft.code.generator.mysql.repo.mapper.provider;

/**
 * @author raven
 * @date 2020/08/28
 **/
public class TableSqlProvider {

    public String list(String database, String tablePattern) {
        StringBuilder builder = new StringBuilder();
        builder.append("show tables from ${database}");
        if (tablePattern != null && !tablePattern.isEmpty()) {
            builder.append(" like #{tablePattern}");
        }
        return builder.toString();
    }
}
